import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import User from '../views/User.vue'
import Echar from '../views/Echar.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
     redirect:'/HelloWorld'
    },
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld,
      children:[
        {
          path:'/HelloWorld/user/:id',
          component:User
        },
        {
          path:'/HelloWorld/echar',
          component:Echar
        }
      ]
    }
   
  ]
})
